<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="el.User" %>
<%
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
	User user = new User();
	user.setUser_name("George");
	user.setUser_id(4);
	request.setAttribute("userel", user);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Insert title here</title>
</head>
<body>
<!-- 先在pageContext里找 user4test，没有再找request  ... -->
${userel}<br/><!-- 自动调用user的tostring()方法 -->
${userel.user_id}<br/>
${userel.user_name }<br/>
<!--  ${user_name }<br/> 错误-->
<!-- ${userel.user}<br/> 错误，因为User对象中没有名叫user的变量-->
${"你好！el" }<br/>
1+3 = ${1+3}<br/>
${1==2 } <br/>
<!-- 下面3个是常量 -->
${"中华人们"}<br/>
${12345}<br/>
${true}<br/>
<!-- 以下是运算符 -->
<!--${3==4||3==3 }<br/>  -->
${user4test.password=="123"}<br/><!-- false-->
${123=="123"} ${123=="234"}<br/><!-- 注意，发生了类型转换 -->
3+4=${3+4}<br/>
<!-- ${3==3?"正确":"错误"} -->
<br/>



</body>
</html>